package com.ai.service.security;

import com.ai.common.CommonResponse;
import com.ai.entity.security.SysUser;
import com.ai.entity.security.SysUserRoleRelation;
import com.ai.model.param.SysUserRoleRelationParam;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 用户角色关联关系表 服务类
 * </p>
 *
 * @author chen
 * @since 2023-04-04 19:46:07
 */
public interface ISysUserRoleRelationService extends IService<SysUserRoleRelation> {

     boolean removeByUserId(Integer id);

    CommonResponse<String> updateRelation(SysUserRoleRelationParam sysUserRoleRelationParam);

    CommonResponse<String> add(SysUserRoleRelationParam sysUserRoleRelationParam);

    /**
     * 保存用户角色关系表------系统角色
     * @param sysUser
     * @return
     */
    boolean saveSystemRelation(SysUser sysUser,String roleId);


    /**
     * 保存用户本身 角色关系表
     * @param sysUser
     * @return
     */
    SysUserRoleRelation saveItselfRelation(SysUser sysUser);
}
